package com.oop.Demo01;
/**
 * @Author Void
 * @Description //TODO 一个项目应该只存在一个main方法
 * @Date 21:35 2021/3/4
 * @Param
 * @return
 **/
//测试类
public class App {
    public static void main(String[] args) {

        //用new实例化一个对象
        Person personA = new Person();//这里将会跳转到Person类的构造方法
        System.out.println(personA.name);//void 构造器初始化为void

        Person personB = new Person("cmy");//这里寻找有参构造器
        System.out.println(personB.name);



    }
}

/**
 * @Author Void
 * @Description //TODO
 * @Date 21:48 2021/3/4
 * @Param
 * @return
 * //将Student类实例化 生成studentA对象
     Student studentA = new Student();

     System.out.println(studentA.name);//null
     studentA.name = "Void";
     studentA.age = 18;

     System.out.println(studentA.name);
     System.out.println(studentA.age);
 **/
    